package lex.mtd.core;

public class DownloadManagerConfig implements java.io.Serializable, Cloneable
{
	public transient static final int DEFAUKT_THREAD_LIMIT = 2; 
	
	private static final long serialVersionUID = -4681414482939546208L;
	static transient final DownloadManagerConfig DEFAULT = new DownloadManagerConfig();
	public int minimalTimeBlock = 5;// seconds
	public int minimalDataBlock = 5 * 1024;// bytes
	public int maximalThreadCount = DEFAUKT_THREAD_LIMIT;

	@Override
	public DownloadManagerConfig clone()
	{
		try
		{
			return (DownloadManagerConfig) super.clone();
		}
		catch( CloneNotSupportedException e )
		{
			e.printStackTrace();
			DownloadManagerConfig c = new DownloadManagerConfig();
			c.minimalTimeBlock = this.minimalTimeBlock;
			c.minimalDataBlock = this.minimalDataBlock;
			c.maximalThreadCount = this.maximalThreadCount;
			return c;
		}
	}
}
